package com.lagou.bean;

import com.lagou.service.HelloService;
import com.lagou.service.TpService;
import com.lagou.service.WorldService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;

@Component
public class ConsumerComponent {

    @DubboReference
    private HelloService helloService;

    @DubboReference
    private WorldService worldService;

    @DubboReference
    private TpService tpService;

    public String sayHello(String name, int timeToWait) {
        return helloService.sayHello(name, timeToWait);
    }

    public String sayWorld(String name, int timeToWait) {
        return worldService.sayWorld(name, timeToWait);
    }


    public void methodA () {
        tpService.methodA();
    }

    public void methodB () {
        tpService.methodB();
    }

    public void methodC () {
        tpService.methodC();
    }
}
